package com.activity.dao.impl;

import java.util.List;

import javax.annotation.Resource;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;
import com.activity.dao.ActivityDao;
import com.activity.model.Activitys;
@Component
public class ActivityDaoImpl  extends SqlSessionDaoSupport implements  ActivityDao {
	

	@Resource
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		// TODO Auto-generated method stub
		super.setSqlSessionFactory(sqlSessionFactory);
	}
	@Override
	public List<Activitys> queryActivitys() {
		SqlSession session = getSqlSession();
		String statement = "com.activity.mapper.ActivityMapper.queryActivitys";
		List<Activitys> list =session.selectList(statement);
		System.out.println(list.get(0));
		return list;
	}

}
